LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

inherit genimage

DEPENDS += "mtools-native e2fsprogs-native genext2fs-native"
DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'sd', ' phyuboot ', '', d)}"
do_genimage[depends] += "virtual/kernel:do_deploy core-image-xfce:do_image_complete"

SRC_URI += "file://genimage-efiphytium.config \
           file://genimage-sdphytium.config  "

# efi, sd
BOOT = "${@bb.utils.contains('MACHINE_FEATURES', 'sd', 'sdphytium', 'efiphytium', d)}"

do_configure:prepend (){
    cp ${WORKDIR}/genimage-${BOOT}.config  ${WORKDIR}/genimage.config
}
GENIMAGE_ROOTFS_IMAGE ?= "core-image-xfce"
GENIMAGE_ROOTFS_IMAGE_FSTYPE ?= "tar.gz"
GENIMAGE_CREATE_BMAP = "1"
GENIMAGE_IMAGE_FULLNAME = "${@bb.utils.contains('MACHINE_FEATURES', 'sd', 'phydisk-sd.img', 'phydisk.img', d)}"
